<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="../../Templates/SubFolderTemplate.xhtml"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core">
    
    <ui:define name="content">
        
        <f:view beforePhase="#{editProductPriceManagerBean.initView}">
        
        <h:form>                               
            <p:panel id="panel" header="Edit Product"> 
                <p:ajaxStatus style="width:16px;height:16px;">   
                    <f:facet name="start">   
                        <p:graphicImage value="http://www.primefaces.org:8080/showcase/design/ajaxloading.gif" /> 
                    </f:facet> 
 
                    <f:facet name="complete">   
                        <h:outputText value="" />   
                    </f:facet>   
                </p:ajaxStatus> 
 
                <p:messages /> 
 
                <h:panelGrid columns="3" cellpadding="10"> 
                    
                    <h:outputLabel for="productType" style="font-weight: bold" value="Product Type: " /> 
                    <h:outputText id="productType" value="#{editProductPriceManagerBean.productToEdit.productType}"/> 
                    <p:message for="productType" /> 
                    
                    <h:outputLabel for="lowerLimit" style="font-weight: bold" value="Lower Limit: " /> 
                    <p:inputText id="lowerLimit" value="#{editProductPriceManagerBean.productToEdit.lowerLimit}"  required="true" label="lowerLimit" requiredMessage="Lower Limit is required." />
                    <p:message for="lowerLimit" /> 
                    
                    <h:outputLabel for="higherLimit" style="font-weight: bold" value="Higher Limit: " /> 
                    <p:inputText id="higherLimit" value="#{editProductPriceManagerBean.productToEdit.higherLimit}"  required="true" label="higherLimit" requiredMessage="Higher Limit is required." />
                    <p:message for="higherLimit" /> 
                    
                    <h:outputLabel for="productPrice" style="font-weight: bold" value="Product Price: " /> 
                    <p:inputText required="true" label="productPrice" requiredMessage="Product Price is required." id="productPrice" value="#{editProductPriceManagerBean.productToEdit.productPrice}" />
                    <p:message for="productPrice" /> 
                    
                </h:panelGrid>                
                <p:commandButton id="btn" value="Update Product" update="panel" actionListener="#{editProductPriceManagerBean.updateProductPrice(event)}" ajax="true" />
                <p:commandButton value="Clear" type="Reset"/>
            </p:panel> 
        </h:form>
            
        </f:view>
    </ui:define>

</ui:composition>

